<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
	<xsl:import href="../mdp.xsl"/>
	<xsl:import href="../config.xsl"/>
	<xsl:template match="/">
		<xsl:choose>
			<xsl:when test="contains(//form/b/font/text(),'您空闲超时')">
				<msc type="servermsg">
					<msg isshow="1" nextaction="gologin">您与服务器的会话已到期 或是无效的。当前操作未被执行。</msg>
				</msc>
			</xsl:when>
			<xsl:otherwise>
				<msc type="form">
					<head>
						<title>公告高级检索</title>
					</head>
					<body>
						<!--标题-->
						<span width="100%" align="center">
							<strong>
								<font color="#FF0000">
									<xsl:value-of select="//div[@class='sw_title']/span[2]/text()"/>
								</font>
							</strong>
						</span>
						<hr/>
						<!--查询条件展现-->
						<span width="100%">
							<xsl:apply-templates select="//div[@class='sw_condition']/table/tr[position()&gt;1 and position()&lt;6]/td"/>
							<span width="30%">
								<font color="#B00737">
									是否已处理
								</font>
							</span>
							<span width="70%">
								<xsl:apply-templates select="//div[@class='sw_condition']/table/tr[6]/td[2]/font/input"/>
								<xsl:apply-templates select="//div[@class='sw_condition']/table/tr[6]/td[2]/font/label" mode="label_1"/>
							</span>
							<span width="30%">
								<font color="#B00737">
									查询条件：
								</font>
							</span>
							<span width="70%">
								<xsl:apply-templates select="//div[@class='sw_condition']/table/tr[7]/td[2]/font/input"/>
								<xsl:apply-templates select="//div[@class='sw_condition']/table/tr[7]/td[2]/font/label" mode="label_1"/>
							</span>
						</span>
						<!--隐藏参数-->
						<input value="{//form/@action}" name="action_url" type="hidden"/>
						<xsl:apply-templates select="//form/input" mode="none"/>
						<hr/>
					</body>
					<foot>
						<item target="_blank" type="submit" caption="查询" align="primary" />
					</foot>
				</msc>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--单选按钮模版-->
	<xsl:template match="label" mode="label_1">
		<xsl:apply-templates select="input"/>
		<xsl:value-of select="text()"/>
		<br/>
	</xsl:template>
	<xsl:template match="td">
		<xsl:choose>
			<!--标题展现-->
			<xsl:when test="position() mod 2 !=0">
				<span width="30%">
					<font color="#B00737">
						<xsl:value-of select="div/font/text()"/>
					</font>
				</span>
			</xsl:when>
			<!--内容展现-->
			<xsl:otherwise>
				<span width="70%">
					<xsl:apply-templates select="font/input"/>
				</span>
				<br/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
	<!--隐藏参数-->
	<xsl:template match="input" mode="none">
		<xsl:choose>
			<xsl:when test="@name='__Click'">
				<xsl:variable name="before">
					<xsl:value-of select="substring-before((//input[@name='search']/@onclick),&quot;&apos;, this&quot;)"/>
				</xsl:variable>
				<input value="{substring-after($before,&quot;(&apos;&quot;)}" name="__Click" type="hidden"/>
			</xsl:when>
			<xsl:otherwise>
				<input type="hidden" name="{@name}" value="{@value}"/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>
</xsl:stylesheet>
